$OpenBSD: patch-qtbase_mkspecs_features_create_cmake_prf,v 1.3 2015/04/19 13:18:28 zhuk Exp $
Make sure correct library filenames get propagated into CMake package
config files.
--- qtbase/mkspecs/features/create_cmake.prf.ports.orig	Tue Feb 17 07:56:54 2015
+++ qtbase/mkspecs/features/create_cmake.prf	Wed Apr  8 00:38:30 2015
@@ -246,10 +246,16 @@ mac {
         CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.so
         CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.so
         CMAKE_LIB_SONAME = lib$${CMAKE_QT_STEM}.so
-    } else {
-        CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.so.$$eval(QT.$${MODULE}.VERSION)
-        CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.so.$$eval(QT.$${MODULE}.VERSION)
-        CMAKE_LIB_SONAME = lib$${CMAKE_QT_STEM}.so.$$eval(QT.$${MODULE}.MAJOR_VERSION)
+    } else:eval(LIBVER_OVERRIDE = \$\$(LIB$${CMAKE_QT_STEM}_VERSION)) {
+        !isEmpty(QMAKE_OPENBSD_SHLIB):!isEmpty(LIBVER_OVERRIDE) {
+            # OpenBSD-style version overriding, no SONAME intended
+            CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.so.$${LIBVER_OVERRIDE}
+            CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.so.$${LIBVER_OVERRIDE}
+        } else {
+            CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.so.$$eval(QT.$${MODULE}.VERSION)
+            CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.so.$$eval(QT.$${MODULE}.VERSION)
+            CMAKE_LIB_SONAME = lib$${CMAKE_QT_STEM}.so.$$eval(QT.$${MODULE}.MAJOR_VERSION)
+        }
     }
 }
 
